package com.ruoyi.electricity.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.electricity.mapper.CoalMineInfoMapper;
import com.ruoyi.electricity.domain.CoalMineInfo;
import com.ruoyi.electricity.service.ICoalMineInfoService;

import javax.servlet.http.HttpServletRequest;

/**
 * 煤矿信息配置Service业务层处理
 *
 * @author ljw
 * @date 2023-12-06
 */
@Service
public class CoalMineInfoServiceImpl implements ICoalMineInfoService
{
    @Autowired
    private CoalMineInfoMapper coalMineInfoMapper;

    /**
     * 查询煤矿信息配置
     *
     * @param id 煤矿信息配置主键
     * @return 煤矿信息配置
     */
    @Override
    public CoalMineInfo selectCoalMineInfoById(Integer id)
    {
        return coalMineInfoMapper.selectCoalMineInfoById(id);
    }

    /**
     * 查询煤矿信息配置列表
     *
     * @param coalMineInfo 煤矿信息配置
     * @return 煤矿信息配置
     */
    @Override
    public List<CoalMineInfo> selectCoalMineInfoList(CoalMineInfo coalMineInfo)
    {
        return coalMineInfoMapper.selectCoalMineInfoList(coalMineInfo);
    }

    /**
     * 查询煤矿信息配置列表V2
     * 新增权限管理版本
     * @param coalMineInfo 煤矿信息配置
     * @return 煤矿信息配置
     */
    @Override
    public List<CoalMineInfo> selectCoalMineInfoListV2(CoalMineInfo coalMineInfo)
    {
        return coalMineInfoMapper.selectCoalMineInfoListV2(coalMineInfo);
    }


    /**
     * 新增煤矿信息配置
     *
     * @param coalMineInfo 煤矿信息配置
     * @return 结果
     */
    @Override
    public int insertCoalMineInfo(CoalMineInfo coalMineInfo)
    {
        return coalMineInfoMapper.insertCoalMineInfo(coalMineInfo);
    }

    /**
     * 修改煤矿信息配置
     *
     * @param coalMineInfo 煤矿信息配置
     * @return 结果
     */
    @Override
    public int updateCoalMineInfo(CoalMineInfo coalMineInfo)
    {
        return coalMineInfoMapper.updateCoalMineInfo(coalMineInfo);
    }

    /**
     * 批量删除煤矿信息配置
     *
     * @param ids 需要删除的煤矿信息配置主键
     * @return 结果
     */
    @Override
    public int deleteCoalMineInfoByIds(Integer[] ids)
    {
        return coalMineInfoMapper.deleteCoalMineInfoByIds(ids);
    }

    /**
     * 删除煤矿信息配置信息
     *
     * @param id 煤矿信息配置主键
     * @return 结果
     */
    @Override
    public int deleteCoalMineInfoById(Integer id)
    {
        return coalMineInfoMapper.deleteCoalMineInfoById(id);
    }
}
